import axios from '../axios';

export default {
    //新增用户
    customersAdd(data){
        return axios({
            url: './customers/addCustomers',
            method: 'post',
            data
        });
    },
    //通过销售员Id获取用户
    getCustomersBySalesmansId(params){
        return axios({
            url: './customers/getCustomersBySalesmansId',
            params
        });
    },
    //获取所有用户
    getCustomers(params){
        return axios({
            url: './customers/getCustomers',
            params
        })
    },
    //通过_id删除用户
    deleteCustomers(data){
        return axios({
            url: './customers/delCustomersById',
            method: 'post',
            data
        })
    },
    //通过id获取一个用户
    // getOneCustomer(data){
    //     return axios({
    //         url: './customers/alterCustomersById',
    //         method: 'post',
    //         data
    //     })
    // }
    //修改用户数据
    alterCustomer(data){
        return axios({
            url:'./customers/sureAlterCustomers',
            method: 'post',
            data
        })
    }
}